//
//  HMCommonTools.swift
//  Weibo
//
//  Created by 李学林 on 15/12/9.
//  Copyright © 2015年 tete. All rights reserved.
//

import UIKit

let  SCREENW = UIScreen.mainScreen().bounds.size.width
let  SCREENH = UIScreen.mainScreen().bounds.size.height

// 切换控制器的通知
let HMSwitchRootVCNotifation = "HMSwitchRootVCNotifation"
// 表情点击发送的通知
let HMEmoticonButtonDidSelectedNotification = "HMEmoticonButtonDidSelectedNotification"

func RGB(red red:CGFloat ,green:CGFloat ,blue:CGFloat) ->UIColor{
    return UIColor(red: red / 255, green: green / 255 , blue: blue / 255, alpha: 1)

}

func RandomColor() -> UIColor {
    return RGB(red: CGFloat(random() % 256), green: CGFloat(random() % 256), blue: CGFloat(random() % 256))
}

func printLog(
    message: Any,
    file: String = __FILE__,
    line: Int = __LINE__,
    mthName: String = __FUNCTION__
    ) {
        #if DEBUG
            __LINE__
            print("\((file as NSString).lastPathComponent)[\(line)], \(mthName): \(message)")
        #endif
}